home *** CD-ROM | disk | FTP | other *** search
/ IRIX 6.3 Development Libraries / SGI IRIX 6.3 Development Libraries.iso / dist / dist6.3 / ViewKit_dev.idb / usr / include / Vk / VkFileSelectionDialog.h.z / VkFileSelectionDialog.h
C/C++ Source or Header  |  1996-09-20  |  3KB  |  75 lines

  1. ////////////////////////////////////////////////////////////////////////////////
  2. ///////   Copyright 1992, Silicon Graphics, Inc.  All Rights Reserved.   ///////
  3. //                                                                            //
  4. // This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;     //
  5. // the contents of this file may not be disclosed to third parties, copied    //
  6. // or duplicated in any form, in whole or in part, without the prior written  //
  7. // permission of Silicon Graphics, Inc.                                       //
  8. //                                                                            //
  9. // RESTRICTED RIGHTS LEGEND:                                                  //
  10. // Use,duplication or disclosure by the Government is subject to restrictions //
  11. // as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data     //
  12. // and Computer Software clause at DFARS 252.227-7013, and/or in similar or   //
  13. // successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -    //
  14. // rights reserved under the Copyright Laws of the United States.             //
  15. //                                                                            //
  16. ////////////////////////////////////////////////////////////////////////////////
  17.  
  18. #ifndef VKFILESELECTIONDIALOG_H
  19. #define VKFILESELECTIONDIALOG_H
  20.  
  21. /////////////////////////////////////////////////////////////////////////
  22. // VkFileSelectionDialog.h --
  23. //   hajadi@csd.sgi.com
  24. /////////////////////////////////////////////////////////////////////////
  25.  
  26. #include <Vk/VkDialogManager.h>
  27.  
  28. class VkFileSelectionDialog : public VkDialogManager {
  29.  
  30.  public:
  31.  
  32.     VkFileSelectionDialog( const char* name ) : VkDialogManager( name ) { _fileName   = NULL; 
  33.                                       _selection  = NULL;
  34.                                       _filter     = NULL;
  35.                                       _directory  = NULL;  
  36.                                       _showApply  = TRUE;  }
  37.     virtual ~VkFileSelectionDialog();
  38.  
  39.     const char* className();
  40.     const char* fileName()       const { return _fileName; }
  41.  
  42.     // Interface
  43.  
  44.     void setDirectory(const char *);
  45.     void setSelection(const char *);
  46.     void setFilterPattern(const char *);
  47.  
  48.   protected:
  49.  
  50.     virtual Widget createDialog( Widget dialogParent );
  51.  
  52.     virtual void ok(Widget, XtPointer);
  53.     virtual void apply(Widget, XtPointer);
  54.     virtual void cancel(Widget, XtPointer);
  55.  
  56.     XmFileSelectionBoxCallbackStruct *callData() const;
  57.  
  58.  
  59.   private:
  60.  
  61.     char  *_fileName;
  62.     char *_selection;
  63.     char *_filter;
  64.     char *_directory;
  65.  
  66.     XmFileSelectionBoxCallbackStruct *_callData;
  67. };
  68.  
  69. extern VkFileSelectionDialog *getTheFileSelectionDialog();
  70.     
  71. #define theFileSelectionDialog getTheFileSelectionDialog()
  72.  
  73.  
  74. #endif // VKFILESELECTIONDIALOG_H
  75.